package com.fenxiangtech.mall.web.spring;

import com.fenxiangtech.mall.exception.ResourceNotFoundException;
import org.springframework.web.servlet.DispatcherServlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author zhangjiashun
 */
public class CustomDispatcherServlet extends DispatcherServlet {

    @Override
    protected void noHandlerFound(HttpServletRequest request, HttpServletResponse response) throws Exception {
        throw new ResourceNotFoundException();
    }
}
